target: lib

include ../../makeconf

OBJ_PATH 	= .
LIB_OUTPUT 	= $(LIB_OUTPUT_PATH)/libopenssl$(LIB_EXTNAME)

ALLSRC = $(wildcard src/*.c) $(wildcard src/*.cpp)
ALLOBJ = $(patsubst %.c, $(OBJ_PATH)/%.o, $(filter %.c, $(ALLSRC))) \
		 $(patsubst %.cpp, $(OBJ_PATH)/%.o, $(filter %.cpp, $(ALLSRC)))

$(OBJ_PATH)/%.o:%.c
	$(GCC) $(INCPATH) $(INC_OPENSSL) -c -o $@ $<

$(OBJ_PATH)/%.o:%.cpp
	$(CPP) $(INCPATH) $(INC_OPENSSL) -c -o $@ $<

lib:$(ALLOBJ)
	$(ARLIB) $(LIB_OUTPUT) $(ALLOBJ)

clean:
	@$(DELETEFILE) $(OBJ_PATH)/src/*.o
